package com.yuexunit.finance.member.action.v1;

import java.util.Date;
import java.util.List;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.member.action.v1.model.MonthEarningDetail;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

public interface MonthEarningApi {
	
	@Permission
	@Action(version = FinVersion1.class, description = "企业月账单信息列表")
	public PageList<MonthEarningDetail> inquiryMonthEarningPageList(
		@Parameter(name = "year", description = "年", nullable = true) Integer year,
		@Parameter(name = "month", description = "月", nullable = true) Integer month,
		@Parameter(name = "monthEarningNumber", description = "利息结算编号", nullable = true) String monthEarningNumber,
		@Parameter(name = "enterpriseName", description = "企业名称", nullable = true) String enterpriseName,
		@Parameter(name = "earningDateStar", description = "出账时间开始", nullable = true) Date earningDateStar,
		@Parameter(name = "earningDateEnd", description = "出账时间结束", nullable = true) Date earningDateEnd,
		@Parameter(name = "confirmStatus", description = "确认状态", nullable = true) Integer confirmStatus,
		@Parameter(name = "page", description = "分页参数") PageCriteria page
		
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "企业月账单信息列表")
	public List<MonthEarningDetail> inquiryMonthEarningList(
		@Parameter(name = "year", description = "年", nullable = true) Integer year,
		@Parameter(name = "month", description = "月", nullable = true) Integer month,
		@Parameter(name = "monthEarningNumber", description = "利息结算编号", nullable = true) String monthEarningNumber,
		@Parameter(name = "enterpriseName", description = "企业名称", nullable = true) String enterpriseName,
		@Parameter(name = "earningDateStar", description = "出账时间开始", nullable = true) Date earningDateStar,
		@Parameter(name = "earningDateEnd", description = "出账时间结束", nullable = true) Date earningDateEnd
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "企业月账单详情")
	public MonthEarningDetail inquiryMonthEarningDetail(
		@Parameter(name = "monthEarningNumber", description = "结算编号", nullable = true) String monthEarningNumber,
		@Parameter(name = "enterpriseId", description = "企业ID") Long enterpriseId,
		@Parameter(name = "year", description = "账单年", nullable = true) Integer year ,
		@Parameter(name = "month", description = "账单月", nullable = true) Integer month
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "月账单确认")
	public void confirmMonthEarningDetail(
			@Parameter(name = "monthEarningId", description = "月收益ID") Long monthEarningId
	);
	
	@Action(version = FinVersion1.class, description = "重新计算月账单")
	public void reCountMonthInterest(
			@Parameter(name = "year", description = "年") Integer caseNumber,
			@Parameter(name = "month", description = "月份") Integer month,
			@Parameter(name = "enterpriseName", description = "企业名", nullable = true) String enterpriseName,
			@Parameter(name = "enterpriseId", description = "企业ID", nullable = true) Long enterpriseId
	);
}
